<?php
/*
Template Name:Prower V3
Description:这是Prower开发的一款比较简洁、快速的WordPress模板，没有使用图片,整体色调以灰黑为主。
Author:由Prower开发，Jack Hsu移植。
Author Url:http://www.simit.cn
Sidebar Amount:1
ForEmlog:4.1.0
*/
if(!defined('EMLOG_ROOT')) {exit('error!');}
require_once (View::getView('module'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="<?php echo $site_key; ?>" />
<meta name="description" content="<?php echo $description; ?>" />
<meta name="generator" content="emlog" />
<title><?php echo $blogtitle; ?></title>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?php echo BLOG_URL; ?>xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="<?php echo BLOG_URL; ?>wlwmanifest.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS"  href="<?php echo BLOG_URL; ?>rss.php" />
<link href="<?php echo TEMPLATE_URL; ?>main.css" rel="stylesheet" type="text/css" />
<script src="<?php echo BLOG_URL; ?>include/lib/js/common_tpl.js" type="text/javascript"></script>
<?php doAction('index_head'); ?>
</head>
<body>
<div>
<div id="top">
	<div class="w970">
		<ul>
			<?php
			foreach ($navibar as $key => $val):
			if ($val['hide'] == 'y'){continue;}
			if (empty($val['url'])){$val['url'] = Url::log($key);}
			?>
			<li><a href="<?php echo $val['url']; ?>" target="<?php echo $val['is_blank']; ?>"><?php echo $val['title']; ?></a></li>
			<?php endforeach;?>
			<?php doAction('navbar', '<li class="menus2">', '</li>'); ?>
			<?php if(ROLE == 'admin' || ROLE == 'writer'): ?>
			<li><a href="<?php echo BLOG_URL; ?>admin/write_log.php">写日志</a></li>
			<li><a href="<?php echo BLOG_URL; ?>admin/">管理中心</a></li>
			<li><a href="<?php echo BLOG_URL; ?>admin/?action=logout">退出</a></li>
			<?php else: ?>
			<li><a href="<?php echo BLOG_URL; ?>admin/">登录</a></li>
			<?php endif; ?>
		</ul>
		<?php echo $bloginfo; ?>
	</div>
</div>
<div id="header">
	<div class="w970">
		<h1><a href="<?php echo BLOG_URL; ?>"><?php echo $blogname; ?></a></h1>
		<div id="search">
			<form name="keyform" id="searchform" method="get" action="<?php echo BLOG_URL; ?>index.php">
				<input name="keyword" type="text" value="" id="s" size="20" />
				<input type="submit" id="logserch_logserch" value="搜索" />
			</form>
		</div>
	</div>
</div>
<div id="nav">
	<div class="w970">
		<ul>
			<li><a title="Home" href="<?php echo BLOG_URL; ?>">首 页</a></li>
			<?php if($istwitter == 'y'):?>
            <li><a href="<?php echo BLOG_URL; ?>t/"><?php echo Option::get('twnavi');?></a></li>
            <?php endif;?>
			<?php foreach($CACHE->readCache('sort') as $value): ?>
			<li>
			<a href="<?php echo Url::sort($value['sid']); ?>"><?php echo $value['sortname']; ?></a>
			</li>
			<?php endforeach; ?>
		</ul>
		<div id="rss">
			<a id="rss_icon" title="RSS订阅" href="<?php echo BLOG_URL; ?>rss.php"><img src="<?php echo TEMPLATE_URL; ?>images/rss.gif" alt="订阅Rss"/></a>
		</div>
	</div>
</div>
<!--header end-->